package grupobbva.pe.operhc.form;

import grupobbva.pe.operhc.domain.SegParametros;

import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class UsuarioForm extends ActionForm{

	private static final long serialVersionUID = 1L;
	private String codigo;
	private String tipoUsu;
	private List<SegParametros> listTipoUsuarios;
	private String seleccionados;
	
	private boolean stNew;
	private String stAdmin;
	private String[] cmbReasonSource;
	private String[] cmbReasonDestination;
	
	public UsuarioForm() {
		
		stNew = false;
		stAdmin = "";
		codigo = "";
		tipoUsu = "";
		seleccionados = "";
		cmbReasonSource = new String[0];
		cmbReasonDestination = new String[0];
		listTipoUsuarios = new ArrayList<SegParametros>();
	}

	public String getCodigo() {
		return codigo;
	}

	public void setCodigo(String codigo) {
		this.codigo = codigo;
	}

	public String getTipoUsu() {
		return tipoUsu;
	}

	public void setTipoUsu(String tipoUsu) {
		this.tipoUsu = tipoUsu;
	}

	public List<SegParametros> getListTipoUsuarios() {
		return listTipoUsuarios;
	}

	public void setListTipoUsuarios(List<SegParametros> listTipoUsuarios) {
		this.listTipoUsuarios = listTipoUsuarios;
	}

	public String[] getCmbReasonSource() {
		return cmbReasonSource;
	}

	public void setCmbReasonSource(String[] cmbReasonSource) {
		this.cmbReasonSource = cmbReasonSource;
	}

	public String[] getCmbReasonDestination() {
		return cmbReasonDestination;
	}

	public void setCmbReasonDestination(String[] cmbReasonDestination) {
		this.cmbReasonDestination = cmbReasonDestination;
	}

	public boolean isStNew() {
		return stNew;
	}

	public void setStNew(boolean stNew) {
		this.stNew = stNew;
	}

	public String getStAdmin() {
		return stAdmin;
	}

	public void setStAdmin(String stAdmin) {
		this.stAdmin = stAdmin;
	}

	public String getSeleccionados() {
		return seleccionados;
	}

	public void setSeleccionados(String seleccionados) {
		this.seleccionados = seleccionados;
	}
	
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		try {  
			  request.setCharacterEncoding("UTF-8");  
		} catch (UnsupportedEncodingException ex) {
			ex.printStackTrace();
		}
		super.reset(mapping, request);
	}
	
}
